package com.abc.cloud.dao;

import com.abc.cloud.dto.user.UserDto;
import com.abc.cloud.entity.ChatUserEntity;
import com.abc.cloud.entity.UserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 聊天成员表
 * 
 * @author LiJunXi
 * @email 2770063826@qq.com
 * @date 2023-11-29 13:17:40
 */
@Mapper
public interface ChatUserDao extends BaseMapper<ChatUserEntity> {

    List<UserDto> queryChatUserByChatId(Long chatId);

    void increaseUnreadCount(@Param("chatId") Long chatId, @Param("userId") Long userId);

    void changeReadCount(@Param("chatId") Long chatId, @Param("userId") Long userId, @Param("readCount") int readCount);
}
